# -*- coding: utf-8 -*-
# __author__:song
# @time 2021/12/21 18:07
# @file v1_login
# 无任何处理方式登录
import requests

def v1_login(session,base_url,username="test",pwd="123456"):
    url = "{}/api/v1/login".format(base_url)
    body = {
        "username":username,
        "password":pwd
    }
    res = session.post(url,json=body)
    return res

def v1_register(session,base_url,username="test001",pwd="123456",email="123@qq.com"):
    url = "{}/api/v1/register".format(base_url)
    body = {
        "username":username,
        "password": pwd,
        "email":email
    }
    res = session.post(url,json=body)
    return res

if __name__ == '__main__':
    session = requests.Session()
    base_url = "http://49.235.92.12:7005"
    print(v1_login(session,base_url).text)
